<?php

/**
 * tests actions.
 *
 * @package    TB
 * @subpackage tests
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class testsActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->tu = TuPeer::retrieveByPk($request->getParameter('id'));
    $this->forward404Unless($this->tu);
    $criteria = new Criteria();
    $criteria->addJoin(TestCategPeer::ID, TestPeer::TEST_CATEG_ID);
    $criteria->add(TestPeer::TU_ID, $request->getParameter('id'));
    $criteria->setDistinct();
    $this->tb_opt_categ = TestCategPeer::doSelect($criteria);

  }
}
